<?php

require_once('data/SugarBean.php');
require_once('modules/DocumentRevisions/DocumentRevision.php');

class LatestRevision {
	function LatestRevision(&$bean, $event, $arguments)
	{
		global $app_list_strings;

		$latest_revision = new DocumentRevision();
		$latest_revision->retrieve($bean->document_revision_id);
		if(isset($latest_revision->task_type) && !empty($latest_revision->task_type)){
			$bean->latest_rev_for_task = $app_list_strings['task_type_dom'][$latest_revision->task_type];
		}
	}
}

?>
